@extends('admin.main')
@section('body')
	<div class="main-title">
		<h2>{{isset($info['pid']) ? '编辑':'新增'}}水票套餐</h2>
	</div>
	<div class="tab-wrap">
		<div class="tab-content">
			<form action="" method="post" class="form-horizontal">
				<!-- 基础 -->
				<div id="tab1" class="tab-pane in tab1">
					{{--<div class="form-item">--}}
						{{--<label class="item-label">上级分类<span class="check-tips"></span></label>--}}
						{{--<div class="controls">--}}
							{{--<input type="text" class="text input-large" disabled="disabled" value="{{isset($category['title']) ? $category['title'] : '无'}}"/>--}}
						{{--</div>--}}
					{{--</div>--}}
					<div class="form-item">
						<label class="item-label">
							套餐名称<span class="check-tips">（套餐名称不能为空）</span>
						</label>
						<div class="controls">
							<input type="text" name="title" class="text input-large" value="{{isset($info['title']) ? $info['title'] : ''}}">
						</div>
					</div>
					<div class="form-item">
						<label class="item-label">
							购买数量<span class="check-tips">（购买数量不能小于0）</span>
						</label>
						<div class="controls">
							<input type="text" name="buy_num" class="text input-large" value="{{isset($info['buy_num']) ? $info['buy_num'] : 0}}">
						</div>
					</div>
					<div class="form-item">
						<label class="item-label">
							赠送数量<span class="check-tips">（赠送数量不能小于0）</span>
						</label>
						<div class="controls">
							<input type="text" name="gift_num" class="text input-large" value="{{isset($info['gift_num']) ? $info['gift_num'] : 0}}">
						</div>
					</div>
					<div class="form-item">
						<label class="item-label">
							附加优惠信息<span class="check-tips"></span>
						</label>
						<div class="controls">
							<input type="text" name="description" class="text input-large" value="{{isset($info['description']) ? $info['description'] : ''}}">
						</div>
					</div>
				</div>
				<div class="form-item">
					<label class="item-label">排序<span class="check-tips">（用于前台显示的顺序）</span></label>
					<div class="controls">
						<input type="text" class="text input-small" name="sort" value="{{isset($info['sort']) ? $info['sort'] : 0}}">
					</div>
				</div>
				<div class="form-item">
					<input type="hidden" name="id" value="{{isset($info['id']) ? $info['id'] : ''}}">
					<input type="hidden" name="shop_id" value="{{isset($info['shop_id']) ? $info['shop_id'] : ''}}">
					<button type="submit" id="submit" class="btn submit-btn ajax-post" target-form="form-horizontal">确 定</button>
					<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</form>
		</div>
	</div>
@endsection
@section('script')
	<script type="text/javascript">
		$(function(){
			showTab();
			$("input[name=reply]").change(function(){
				var $reply = $(".form-item.reply");
				parseInt(this.value) ? $reply.show() : $reply.hide();
			}).filter(":checked").change();
		});
	</script>
@endsection
